<?php

class WSB_Acl extends Zend_Acl
{

	/**
	 * @param string $privilege
	 * @param string $role
	 * @param string $resource
	 * @return string
	 */
	public function getRuleType($privilege, $role, $resource)
	{
		$privileges = $this->_getRules($this->get($resource), $this->getRole($role));
		if(is_array($privileges)) {
			$current = current($privileges);
			if(array_key_exists($privilege, $current)) {
				return $current[$privilege]['type'];
			}
		}
		return null;

	}

}
